﻿@{
    Layout = null;
}
@model LY.Entity.U_Member

<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>ChangePwd</title>
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#btnBangDing").click(function () {
                $.ajax({
                    url: "/Default/CheckBankBangDing",
                    type: "Post",
                    success: function (data) {
                        if (data == "yes") {
                            alert("已绑定该银行卡");
                        } else {
                            $("#formBank").submit();
                        }
                    },
                    data: "memberId=" + $("#Id").val() + "&cardNo=" + $("#CardNo").val()//这里没有参数可以不穿
                })
            });
        });
    </script>
</head>
<body>
    <div>
        <form id="formEdit" method="post" action="@Url.Action("SavePwd")">
        <table>
            <tr>
                <td>请输入旧密码</td>
                <td>@Html.TextBox("oldPwd")</td>
            </tr>
            <tr>
                <td>请输入新密码</td>
                <td>@Html.TextBox("newPwd")</td>
            </tr>
            <tr>
                <td>请再次输入新密码</td>
                <td>@Html.TextBox("newPwd2")</td>
            </tr>
            <tr>
                <td><input type="hidden" value="@Model.ID" id="Id" name="Id"/></td>
                <td><input type="button" value="修改" id="btnSave"/></td>
            </tr>
        </table>
        </form>
        <hr />
        下面是绑定银行卡功能
        <form id="formBank" method="post" action="@Url.Action("SaveBankCard")">
            <table>
                <tr>
                    <td>请输入卡号:</td>
                    <td>@Html.TextBox("CardNo")</td>
                </tr>
                <tr>
                    <td>请输入持卡人姓名:</td>
                    <td>@Html.TextBox("CardName")</td>
                </tr>
                <tr>
                    <td>请选择银行:</td>
                    @*<td>@Html.TextBox("BankName")</td>*@
                    <td>@Html.ResourceDropDownList("BankName","BankCard","BankName",new { @class="wh80 select"})</td>
                </tr>
                <tr>
                    <td><input type="hidden" value="@Model.ID" id="Id2" name="Id2"/></td>
                    <td><input type="button" value="绑定" id="btnBangDing"/></td>
                </tr>
            </table>
        </form>
    </div>
</body>
</html>
